﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _10_GDI_绘制图像
{
    public partial class Form1 : Form
    {
        Bitmap bitmapRun = new Bitmap("./运行中.png");
        Bitmap bitmapStop = new Bitmap("./中止.png");
        Graphics g;
        public Form1()
        {
            InitializeComponent();
            g = pictureBox1.CreateGraphics();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            g.Clear(Color.White);
            g.DrawImage(bitmapRun, 0, 0);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            g.Clear(Color.White);
            g.DrawImage(bitmapStop, 0, 0);
        }
    }
}
